
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录</title>
</head>
<%
	Cookie[] sun = request.getCookies();
	if(sun!=null){
		String userName =null;
		String mima =null;
		for (Cookie jiao : sun) {
			if("userName".equals(jiao.getName())){
				userName=jiao.getValue();
			}else if("mima".equals(jiao.getName())){
				mima=jiao.getValue();
			}
		}
		if(userName!=null&&mima!=null){
			String str="Famen?text="+userName+"&password="+mima;
			request.getRequestDispatcher(str).forward(request, response);
			return;
		}
	}

%>
<body>
	<form action="Famen" method="post">
		用户名：<input type="text" name="text" /><br /> 
		密码：<input type="password"name="mima" /><br/>
		 <input type="submit" value="登录">
		 <input type="reset" value="重置">
		<a href="register.jsp">注册</a>
	</form>
</body>
</html>